import Vue from 'vue'
import App from './App.vue'
import router from './router'
//第一步进行添加axios的方法
import axios from "axios";

Vue.config.productionTip = false

axios.interceptors.request.use(config=> {

  var token=localStorage.getItem("token");
  if (token){
    config.headers.token=token;
  }
  return config;
})

//第二步把axios挂载到我们的Vue中
Vue.prototype.$http=axios
new Vue({
  router,
  render: h => h(App)
}).$mount('#app')
